package main

import (
	"fmt"
	"os"

	"github.com/spf13/cobra"
)

var vers bool

func main() {
	RootCmd.Execute()
}

var RootCmd = &cobra.Command{
	Use:   "mcube",
	Short: "mcube分布式构建工具",
	Long:  `mcube分布式构建工具`,
	RunE: func(cmd *cobra.Command, args []string) error {
		return cmd.Help()
	},
}

func Execute() {
	if err := RootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(-1)
	}
}

func init() {
	RootCmd.AddCommand()
	RootCmd.PersistentFlags().BoolVarP(&vers, "version", "v", false, "the mcube version")
}
